package com.lucky.common.base;

import com.lucky.common.util.JsonUtil;
import com.fasterxml.jackson.core.JsonProcessingException;

import java.io.Serializable;

public interface BasePOJO extends Serializable{

	default String toJson(){
		try {
			return JsonUtil.toJson(this);
		} catch (JsonProcessingException e) {
			return this.getClass().getSimpleName();
		}
	}
	
}
